home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / linkedit / linkedit.lha / link-edit / LinkEdit / Box / README < prev    next >
Encoding:
Text File  |  1991-03-13  |  4.3 KB  |  170 lines

  1. 9/10/90
  2.  
  3. Notes on selection:
  4.    The following defines a valid selection of a box:
  5.     if the current box is a menu, then the selected box must be
  6. a descendent of that box.
  7.     if the current box is a slider, toggle, or text entry box, then
  8. the selected box must be a descendent or a sibling of the that box.
  9.     a key press will first go to a currently selected text entry box, and
  10. if there is no such then be checked for box selection.
  11.  
  12.     If an invalid selection is made the following happens:
  13.   if made with a key press, a warning is printed but no action taken.
  14.   if made with a mouse and the current box is a menu, then the display is
  15. reset to initial conditions.  Otherwise a warning is printed and no action 
  16. is taken.
  17.    
  18.  
  19. The box flags induce_state_change, cleanup, and stop_cleanup:
  20.  
  21.   A state change is induced when a box with a induce_state_change flag set
  22. is "activated".  By default the boxes and their activations 
  23. are:
  24.    Menu items with no children:  select with mouse or keyboard
  25.    toggles:   select with mouse or kybd
  26.    sliders:   change with mouse.
  27.    text entry:  return key hit.
  28.  
  29. A cleanup of display is induced whenever a box with cleanup flag set 
  30. is activated.
  31. By default the clean-up inducing boxes and their activations are as
  32. follows:
  33.    Menu items with no children: select with mouse or kybd.
  34.  
  35. A cleanup can be stopped by a box with a stop_cleanup flag set- when
  36. this is encountered as an ancestor of the clean-up inducing box
  37. the cleanup is stopped and the current box is set to the stopper's
  38. parent.  By default, the stop_cleanup flag is not set for any box.
  39.  
  40. 9/15/90
  41.  
  42. Public functions:
  43.  
  44. Routines to get at box selections
  45.  
  46.      ExtractBoxTopWindow(status)
  47.      VOID *status;
  48.      /* Returns TopWindow cast to an int */
  49.  
  50.      BoxStateChange(status)
  51.      VOID *status;
  52.  
  53.      ExtractBoxSelection(status,choice)
  54.      VOID *status;
  55.      int *choice;
  56.  
  57.      ExtractBoxTextEntryText(status,id,buff)
  58.      VOID *status;
  59.      int id;
  60.      char *buff;
  61.  
  62.      ExtractBoxSliderValue(status,id,value)
  63.      VOID *status;
  64.      int id;
  65.      double *value;
  66.  
  67.      ExtractBoxToggleState(status,id,boolean)
  68.      VOID *status;
  69.      int id;
  70.      int *boolean;
  71.  
  72.      ExtractBoxDimensions(status,id,x,y,width,height)
  73.      VOID *status;
  74.      int id;
  75.      int *x,*y,*width,*height;
  76.  
  77.  
  78.  
  79. Routines to modify essential box variables:
  80.  
  81.      ChangeBoxSliderValue(status,box_id,value)
  82.      VOID *status; int box_id; double value;
  83.  
  84.      ChangeBoxTextPrompt(status,box_id,prompt,attr_id)
  85.      VOID *status;
  86.      int box_id,attr_id;
  87.      char *prompt;
  88.  
  89.      ChangeBoxTextDefault(status,box_id,dflt,attr_id)
  90.      VOID *status;
  91.      int box_id,attr_id;
  92.      char *dflt;
  93.  
  94.      ChangeBoxToggleState(status,box_id,state)
  95.      VOID *status;
  96.      int box_id,state;
  97.      /* state = 1 for on, otherwise off */
  98.  
  99.  
  100. Routines to control box selections and display from the outside
  101.  
  102.      SelectBoxByID(status,id)
  103.      VOID *status;
  104.      int id;
  105.  
  106.      BoxPublicKeyPress(status,key)
  107.      VOID *status;
  108.      char key;
  109.  
  110.      DrawBoxByID(status,id)
  111.      VOID *status;
  112.      int id;
  113.  
  114.  
  115. Routines to create boxes, modify flags
  116.  
  117.      CreateBox(status,type,x,y,width,height)
  118.      VOID *status;
  119.      int type,x,y,width,height;
  120.  
  121.      AddBoxChild(status,child_id,parent_id)
  122.      VOID *status;
  123.      int child_id,parent_id;
  124.  
  125.      ToggleBoxAlwaysVisible(status,id,boolean)
  126.      VOID *status; int id,boolean;
  127.  
  128.      ToggleBoxExclusive(status,id,boolean)
  129.      VOID *status; int id,boolean;
  130.  
  131.      ToggleBoxStopCleanup(status,id,boolean)
  132.      VOID *status; int id,boolean;
  133.  
  134.      ToggleBoxCleanup(status,id,boolean)
  135.      VOID *status; int id,boolean;
  136.  
  137.      ToggleBoxInduceStateChange(status,id,boolean)
  138.      VOID *status; int id,boolean;
  139.  
  140.      ChangeBoxKey(status,box_id,key)
  141.      VOID *status; int box_id; char key;
  142.  
  143.      ChangeBoxVisibility(status,id,visible)
  144.      VOID *status;
  145.      int id,visible;
  146.  
  147.      AddBoxLocalCallback(status,id,callback)
  148.      VOID *status;
  149.      int id;
  150.      int (*callback)();
  151.  
  152.      AddBoxGlobalCallback(status,id,callback)
  153.      void *status;
  154.      int id;
  155.      int (*callback)();
  156.  
  157.      AddBoxText(status,box_id,x,y,strng,attr_id)
  158.      VOID *status;
  159.      int box_id,x,y,attr_id;
  160.      char *strng;
  161.  
  162. Miscellaneous routines:
  163.  
  164.      BoxPublicPrintMessage(status,mssg)
  165.      VOID *status; char *mssg;
  166.  
  167.      BoxPublicUrgentWindowDialogue(status,prmpt,rtrn)
  168.      VOID *status; char *prmpt,*rtrn;
  169.  
  170.